{extend name="public:base" /}
{block name="content"}	
<div class="page-header">
	<h1>	
		{$breadcrumb1}
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			{$breadcrumb2}
		</small>
	</h1>
</div>
<div class="page-header">
	<a href="{:url('Option/add')}" class="btn btn-primary">新增选项</a>
</div>	
	
<div class="row">
	<div class="col-xs-12">	
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>											
						<th>选项名称</th>
						<th>类型</th> 
						
				
						<th>分类</th> 
				
						
						<th>选项值</th> 						 
						
						<th>操作</th>				
					</tr>
				</thead>
				<tbody>
						{volist name="list" id="o" empty="$empty"}
						<tr>		
							<td>{$o.name}</td>		
							
							<td>								
							{switch name="o.type"}
							    {case value="select"}下拉列表{/case}							
							    {case value="radio"}单选组{/case}
							    {case value="checkbox"}多选组{/case}
							    
							    {case value="txt"}文本{/case}							
							    {case value="num"}数字{/case}
							    {case value="time"}日期{/case}
							{/switch}
							</td>	
							
						
							<td>
								{foreach name="category" item="c" }
									{if condition="$o['cid'] eq $c['id']"}
										{$c.name}
									{/if}
								{/foreach}	
							</td>
						
								
							<td>{$o.value}</td>			
							<td>
								<a  class="btn btn-xs btn-info" href='{:url("Option/edit",array("id"=>$o["option_id"]))}'>
									<i class="fa fa-edit bigger-120"></i>
								</a> 
								<a class="delete btn btn-xs btn-danger" href='{:url("Option/del",array("id"=>$o["option_id"]))}' >
									<i class="fa fa-trash bigger-120"></i>
								</a>
							</td>
						</tr>
						{/volist}	
						
						<tr>
							<td colspan="20" class="page">{$list->render()}</td>
						</tr>
				</tbody>
				
			</table>
		</div>
	</div>
</div>
{/block}
